package com.playball.lottery.frm.view;

import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.nostra13.universalimageloader.core.ImageLoader;
import com.playball.lottery.R;
import com.playball.lottery.base.BaseActivity;
import com.playball.lottery.util.province.GlobalUtils;
import uk.co.senab.photoview.PhotoView;
import uk.co.senab.photoview.PhotoViewAttacher;

public class ImagesActivity extends BaseActivity {
    private String url;
    private Bitmap bitmap;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.image);
        Intent intent = this.getIntent();
        url = intent.getStringExtra("str");
        initview();
    }
    private void initview() {
        final PhotoView photoview= (PhotoView) findViewById(R.id.photoview);
        ImageLoader.getInstance().displayImage(url, photoview, GlobalUtils.getDisplayImageOptions());
        photoview.setOnPhotoTapListener(new PhotoViewAttacher.OnPhotoTapListener() {
            @Override
            public void onPhotoTap(View view, float v, float v1) {
                finish();
            }
        });
    }
}
